home *** CD-ROM | disk | FTP | other *** search
- /*
- Flash (SWF) interface to httrack
- Using the library provided by Macromedia(tm)
- from http://www.macromedia.com/software/flash/download/search_engine/index.html
- See swf2html_license.txt for more information on the license
- */
-
- /*
-
- swf2html_cls.cpp
-
- */
-
- #include <stdio.h>
-
- #include "swf2html_cls.h"
-
- bool Swf2HtmlConverterCallback::ConvertSwf2Html(void* buffer, int size,
- void* handle,
- htsmodAddLink callbackLink)
- {
- m_callbackLink = callbackLink;
- m_buffer = (char*) buffer;
- m_size = size;
- m_handle = handle;
- return Swf2HtmlConverter::ConvertSwf2Html();
- }
-
- swf_S32 Swf2HtmlConverterCallback::ReadInput(void *buffer, swf_S32 count)
- {
- if (m_offs > m_size)
- return -1;
- if (m_offs + count > m_size)
- count = m_size - m_offs;
- memcpy(buffer, m_buffer + m_offs, (int) count);
- m_offs += count;
- return count;
- }
-
- void Swf2HtmlConverterCallback::PutString(const char *str)
- {
- }
-
- void Swf2HtmlConverterCallback::PutLink(const char *str)
- {
- m_callbackLink(m_handle, (char*) str);
- }
-
- void Swf2HtmlConverterCallback::PutByte(swf_U8 ch)
- {
- }
-
- void Swf2HtmlConverterCallback::DisplayError(const char *str)
- {
- }
-
- Swf2HtmlConverterCallback::Swf2HtmlConverterCallback()
- {
- m_callbackLink = NULL;
- m_buffer = NULL;
- m_offs = m_size = 0;
- m_handle = NULL;
- }
-